package com.hadoop.rpc;


import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.conf.Configuration;

public class ServerApplication {

    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration() ;
        RPC.Server server = new RPC.Builder(conf).
                setProtocol(MyInterface.class).setInstance(new MyInterfaceImpl()).
                setBindAddress("localhost").setPort(8877).setNumHandlers(5).build() ;
        server.start();
        System.out.println("start serever");
    }
}